home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / IntlResources.p < prev    next >
Text File  |  1996-05-01  |  14KB  |  356 lines

  1. {
  2.      File:        IntlResources.p
  3.  
  4.      Contains:    International Resource definitions.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT IntlResources;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __INTLRESOURCES__}
  28. {$SETC __INTLRESOURCES__ := 1}
  29.  
  30. {$I+}
  31. {$SETC IntlResourcesIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37.  
  38. {$PUSH}
  39. {$ALIGN MAC68K}
  40. {$LibExport+}
  41.  
  42.  
  43. CONST
  44.                                                                 {  Bits in the itlcFlags byte  }
  45.     itlcShowIcon                = 7;                            { Show icon even if only one script }
  46.     itlcDualCaret                = 6;                            { Use dual caret for mixed direction text }
  47.                                                                 {  Bits in the itlcSysFlags word  }
  48.     itlcSysDirection            = 15;                            { System direction - left to right/right to left }
  49.     tokLeftQuote                = 1;                            {  NumberParts.data[] enumerators                                              }
  50.     tokRightQuote                = 2;                            {   In general, these are NOT to be considered indices into the data[] array  }
  51.     tokLeadPlacer                = 3;
  52.     tokLeader                    = 4;
  53.     tokNonLeader                = 5;
  54.     tokZeroLead                    = 6;
  55.     tokPercent                    = 7;
  56.     tokPlusSign                    = 8;
  57.     tokMinusSign                = 9;
  58.     tokThousands                = 10;
  59.     tokReserved                    = 11;                            {  11 is reserved field  }
  60.     tokSeparator                = 12;
  61.     tokEscape                    = 13;
  62.     tokDecPoint                    = 14;
  63.     tokEPlus                    = 15;
  64.     tokEMinus                    = 16;
  65.     tokMaxSymbols                = 31;
  66.     curNumberPartsVersion        = 1;                            { current version of NumberParts record }
  67.  
  68.     currSymLead                    = 16;
  69.     currNegSym                    = 32;
  70.     currTrailingZ                = 64;
  71.     currLeadingZ                = 128;
  72.  
  73.     mdy                            = 0;
  74.     dmy                            = 1;
  75.     ymd                            = 2;
  76.     myd                            = 3;
  77.     dym                            = 4;
  78.     ydm                            = 5;
  79.  
  80.  
  81. TYPE
  82.     DateOrders                            = SInt8;
  83.  
  84. CONST
  85.     timeCycle24                    = 0;                            { time sequence 0:00 - 23:59 }
  86.     timeCycleZero                = 1;                            { time sequence 0:00-11:59, 0:00 - 11:59 }
  87.     timeCycle12                    = 255;                            { time sequence 12:00 - 11:59, 12:00 - 11:59 }
  88.     zeroCycle                    = 1;                            { old name for timeCycleZero }
  89.     longDay                        = 0;                            { day of the month }
  90.     longWeek                    = 1;                            { day of the week }
  91.     longMonth                    = 2;                            { month of the year }
  92.     longYear                    = 3;                            { year }
  93.     supDay                        = 1;                            { suppress day of month }
  94.     supWeek                        = 2;                            { suppress day of week }
  95.     supMonth                    = 4;                            { suppress month }
  96.     supYear                        = 8;                            { suppress year }
  97.     dayLdingZ                    = 32;
  98.     mntLdingZ                    = 64;
  99.     century                        = 128;
  100.     secLeadingZ                    = 32;
  101.     minLeadingZ                    = 64;
  102.     hrLeadingZ                    = 128;
  103.  
  104. {$IFC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED }
  105. {$ENDC}
  106. {  move OffsetTable to QuickdrawText  }
  107.  
  108. TYPE
  109.     Intl0RecPtr = ^Intl0Rec;
  110.     Intl0Rec = PACKED RECORD
  111.         decimalPt:                CHAR;                                    { decimal point character }
  112.         thousSep:                CHAR;                                    { thousands separator character }
  113.         listSep:                CHAR;                                    { list separator character }
  114.         currSym1:                CHAR;                                    { currency symbol }
  115.         currSym2:                CHAR;
  116.         currSym3:                CHAR;
  117.         currFmt:                UInt8;                                    { currency format flags }
  118.         dateOrder:                UInt8;                                    { order of short date elements: mdy, dmy, etc. }
  119.         shrtDateFmt:            UInt8;                                    { format flags for each short date element }
  120.         dateSep:                CHAR;                                    { date separator character }
  121.         timeCycle:                UInt8;                                    { specifies time cycle: 0..23, 1..12, or 0..11 }
  122.         timeFmt:                UInt8;                                    { format flags for each time element }
  123.         mornStr:                PACKED ARRAY [1..4] OF CHAR;            { trailing string for AM if 12-hour cycle }
  124.         eveStr:                    PACKED ARRAY [1..4] OF CHAR;            { trailing string for PM if 12-hour cycle }
  125.         timeSep:                CHAR;                                    { time separator character }
  126.         time1Suff:                CHAR;                                    { trailing string for AM if 24-hour cycle }
  127.         time2Suff:                CHAR;
  128.         time3Suff:                CHAR;
  129.         time4Suff:                CHAR;
  130.         time5Suff:                CHAR;                                    { trailing string for PM if 24-hour cycle }
  131.         time6Suff:                CHAR;
  132.         time7Suff:                CHAR;
  133.         time8Suff:                CHAR;
  134.         metricSys:                UInt8;                                    { 255 if metric, 0 if inches etc. }
  135.         intl0Vers:                INTEGER;                                { region code (hi byte) and version (lo byte) }
  136.     END;
  137.  
  138.     Intl0Ptr                            = ^Intl0Rec;
  139.     Intl0Hndl                            = ^Intl0Ptr;
  140.     Intl1RecPtr = ^Intl1Rec;
  141.     Intl1Rec = PACKED RECORD
  142.         days:                    ARRAY [1..7] OF Str15;                    { day names }
  143.         months:                    ARRAY [1..12] OF Str15;                    { month names }
  144.         suppressDay:            UInt8;                                    { 255 for no day, or flags to suppress any element }
  145.         lngDateFmt:                UInt8;                                    { order of long date elements }
  146.         dayLeading0:            UInt8;                                    { 255 for leading 0 in day number }
  147.         abbrLen:                UInt8;                                    { length for abbreviating names }
  148.         st0:                    PACKED ARRAY [1..4] OF CHAR;            { separator strings for long date format }
  149.         st1:                    PACKED ARRAY [1..4] OF CHAR;
  150.         st2:                    PACKED ARRAY [1..4] OF CHAR;
  151.         st3:                    PACKED ARRAY [1..4] OF CHAR;
  152.         st4:                    PACKED ARRAY [1..4] OF CHAR;
  153.         intl1Vers:                INTEGER;                                { region code (hi byte) and version (lo byte) }
  154.         localRtn:                ARRAY [0..0] OF INTEGER;                { now a flag for opt extension }
  155.     END;
  156.  
  157.     Intl1Ptr                            = ^Intl1Rec;
  158.     Intl1Hndl                            = ^Intl1Ptr;
  159. { fields for optional itl1 extension }
  160.     Itl1ExtRecPtr = ^Itl1ExtRec;
  161.     Itl1ExtRec = RECORD
  162.         base:                    Intl1Rec;                                { un-extended Intl1Rec }
  163.         version:                INTEGER;
  164.         format:                    INTEGER;
  165.         calendarCode:            INTEGER;                                { calendar code for this itl1 resource }
  166.         extraDaysTableOffset:    LONGINT;                                { offset in itl1 to extra days table }
  167.         extraDaysTableLength:    LONGINT;                                { length of extra days table }
  168.         extraMonthsTableOffset:    LONGINT;                                { offset in itl1 to extra months table }
  169.         extraMonthsTableLength:    LONGINT;                                { length of extra months table }
  170.         abbrevDaysTableOffset:    LONGINT;                                { offset in itl1 to abbrev days table }
  171.         abbrevDaysTableLength:    LONGINT;                                { length of abbrev days table }
  172.         abbrevMonthsTableOffset: LONGINT;                                { offset in itl1 to abbrev months table }
  173.         abbrevMonthsTableLength: LONGINT;                                { length of abbrev months table }
  174.         extraSepsTableOffset:    LONGINT;                                { offset in itl1 to extra seps table }
  175.         extraSepsTableLength:    LONGINT;                                { length of extra seps table }
  176.         tables:                    ARRAY [0..0] OF INTEGER;                { now a flag for opt extension }
  177.     END;
  178.  
  179. {$IFC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED }
  180. {$ENDC}
  181.     UntokenTablePtr = ^UntokenTable;
  182.     UntokenTable = RECORD
  183.         len:                    INTEGER;
  184.         lastToken:                INTEGER;
  185.         index:                    ARRAY [0..255] OF INTEGER;                { index table; last = lastToken }
  186.     END;
  187.  
  188.     UntokenTableHandle                    = ^UntokenTablePtr;
  189.     WideCharPtr = ^WideChar;
  190.     WideChar = RECORD
  191.         CASE INTEGER OF
  192.         0: (
  193.             a:                    PACKED ARRAY [0..1] OF CHAR;            { 0 is the high order character }
  194.             );
  195.         1: (
  196.             b:                    INTEGER;
  197.             );
  198.     END;
  199.  
  200.     WideCharArrPtr = ^WideCharArr;
  201.     WideCharArr = RECORD
  202.         size:                    INTEGER;
  203.         data:                    ARRAY [0..9] OF WideChar;
  204.     END;
  205.  
  206.     NumberPartsPtr = ^NumberParts;
  207.     NumberParts = RECORD
  208.         version:                INTEGER;
  209.         data:                    ARRAY [0..30] OF WideChar;                { index by [tokLeftQuote..tokMaxSymbols] }
  210.         pePlus:                    WideCharArr;
  211.         peMinus:                WideCharArr;
  212.         peMinusPlus:            WideCharArr;
  213.         altNumTable:            WideCharArr;
  214.         reserved:                PACKED ARRAY [0..19] OF CHAR;
  215.     END;
  216.  
  217.     Itl4RecPtr = ^Itl4Rec;
  218.     Itl4Rec = RECORD
  219.         flags:                    INTEGER;                                { reserved }
  220.         resourceType:            LONGINT;                                { contains 'itl4' }
  221.         resourceNum:            INTEGER;                                { resource ID }
  222.         version:                INTEGER;                                { version number }
  223.         resHeader1:                LONGINT;                                { reserved }
  224.         resHeader2:                LONGINT;                                { reserved }
  225.         numTables:                INTEGER;                                { number of tables, one-based }
  226.         mapOffset:                LONGINT;                                { offset to table that maps byte to token }
  227.         strOffset:                LONGINT;                                { offset to routine that copies canonical string }
  228.         fetchOffset:            LONGINT;                                { offset to routine that gets next byte of character }
  229.         unTokenOffset:            LONGINT;                                { offset to table that maps token to canonical string }
  230.         defPartsOffset:            LONGINT;                                { offset to default number parts table }
  231.         resOffset6:                LONGINT;                                { reserved }
  232.         resOffset7:                LONGINT;                                { reserved }
  233.         resOffset8:                LONGINT;                                { reserved }
  234.     END;
  235.  
  236.     Itl4Ptr                                = ^Itl4Rec;
  237.     Itl4Handle                            = ^Itl4Ptr;
  238. {  New NItl4Rec for System 7.0:  }
  239.     NItl4RecPtr = ^NItl4Rec;
  240.     NItl4Rec = RECORD
  241.         flags:                    INTEGER;                                { reserved }
  242.         resourceType:            LONGINT;                                { contains 'itl4' }
  243.         resourceNum:            INTEGER;                                { resource ID }
  244.         version:                INTEGER;                                { version number }
  245.         format:                    INTEGER;                                { format code }
  246.         resHeader:                INTEGER;                                { reserved }
  247.         resHeader2:                LONGINT;                                { reserved }
  248.         numTables:                INTEGER;                                { number of tables, one-based }
  249.         mapOffset:                LONGINT;                                { offset to table that maps byte to token }
  250.         strOffset:                LONGINT;                                { offset to routine that copies canonical string }
  251.         fetchOffset:            LONGINT;                                { offset to routine that gets next byte of character }
  252.         unTokenOffset:            LONGINT;                                { offset to table that maps token to canonical string }
  253.         defPartsOffset:            LONGINT;                                { offset to default number parts table }
  254.         whtSpListOffset:        LONGINT;                                { offset to white space code list }
  255.         resOffset7:                LONGINT;                                { reserved }
  256.         resOffset8:                LONGINT;                                { reserved }
  257.         resLength1:                INTEGER;                                { reserved }
  258.         resLength2:                INTEGER;                                { reserved }
  259.         resLength3:                INTEGER;                                { reserved }
  260.         unTokenLength:            INTEGER;                                { length of untoken table }
  261.         defPartsLength:            INTEGER;                                { length of default number parts table }
  262.         whtSpListLength:        INTEGER;                                { length of white space code list }
  263.         resLength7:                INTEGER;                                { reserved }
  264.         resLength8:                INTEGER;                                { reserved }
  265.     END;
  266.  
  267.     NItl4Ptr                            = ^NItl4Rec;
  268.     NItl4Handle                            = ^NItl4Ptr;
  269.     TableDirectoryRecordPtr = ^TableDirectoryRecord;
  270.     TableDirectoryRecord = RECORD
  271.         tableSignature:            OSType;                                    { 4 byte long table name  }
  272.         reserved:                LONGINT;                                { Reserved for internal use  }
  273.         tableStartOffset:        LONGINT;                                { Table start offset in byte }
  274.         tableSize:                LONGINT;                                { Table size in byte }
  275.     END;
  276.  
  277.     Itl5RecordPtr = ^Itl5Record;
  278.     Itl5Record = RECORD
  279.         versionNumber:            Fixed;                                    { itl5 resource version number  }
  280.         numberOfTables:            INTEGER;                                { Number of tables it contains  }
  281.         reserved:                ARRAY [0..2] OF INTEGER;                { Reserved for internal use  }
  282.         tableDirectory:            ARRAY [0..0] OF TableDirectoryRecord;    { Table directory records  }
  283.     END;
  284.  
  285.     RuleBasedTrslRecordPtr = ^RuleBasedTrslRecord;
  286.     RuleBasedTrslRecord = RECORD
  287.         sourceType:                INTEGER;                                { Transliterate target type for the LHS of the rule  }
  288.         targetType:                INTEGER;                                { Transliterate target type for the RHS of the rule  }
  289.         formatNumber:            INTEGER;                                { Transliterate resource format number  }
  290.         propertyFlag:            INTEGER;                                { Transliterate property flags  }
  291.         numberOfRules:            INTEGER;                                { Number of rules following this field  }
  292.     END;
  293.  
  294.     ItlcRecordPtr = ^ItlcRecord;
  295.     ItlcRecord = RECORD
  296.         itlcSystem:                INTEGER;                                { default system script }
  297.         itlcReserved:            INTEGER;                                { reserved }
  298.         itlcFontForce:            SInt8;                                    { default font force flag }
  299.         itlcIntlForce:            SInt8;                                    { default intl force flag }
  300.         itlcOldKybd:            SInt8;                                    { MacPlus intl keybd flag }
  301.         itlcFlags:                SInt8;                                    { general flags }
  302.         itlcIconOffset:            INTEGER;                                { keyboard icon offset; not used in 7.0 }
  303.         itlcIconSide:            SInt8;                                    { keyboard icon side; not used in 7.0 }
  304.         itlcIconRsvd:            SInt8;                                    { rsvd for other icon info }
  305.         itlcRegionCode:            INTEGER;                                { preferred verXxx code }
  306.         itlcSysFlags:            INTEGER;                                { flags for setting system globals }
  307.         itlcReserved4:            ARRAY [0..31] OF SInt8;                    { for future use }
  308.     END;
  309.  
  310.     ItlbRecordPtr = ^ItlbRecord;
  311.     ItlbRecord = RECORD
  312.         itlbNumber:                INTEGER;                                { itl0 id number }
  313.         itlbDate:                INTEGER;                                { itl1 id number }
  314.         itlbSort:                INTEGER;                                { itl2 id number }
  315.         itlbFlags:                INTEGER;                                { Script flags }
  316.         itlbToken:                INTEGER;                                { itl4 id number }
  317.         itlbEncoding:            INTEGER;                                { itl5 ID # (optional; char encoding) }
  318.         itlbLang:                INTEGER;                                { current language for script  }
  319.         itlbNumRep:                SInt8;                                    { number representation code }
  320.         itlbDateRep:            SInt8;                                    { date representation code  }
  321.         itlbKeys:                INTEGER;                                { KCHR id number }
  322.         itlbIcon:                INTEGER;                                { ID # of SICN or kcs#/kcs4/kcs8 suite. }
  323.     END;
  324.  
  325. {  New ItlbExtRecord structure for System 7.0  }
  326.     ItlbExtRecordPtr = ^ItlbExtRecord;
  327.     ItlbExtRecord = PACKED RECORD
  328.         base:                    ItlbRecord;                                { un-extended ItlbRecord }
  329.         itlbLocalSize:            LONGINT;                                { size of script's local record }
  330.         itlbMonoFond:            INTEGER;                                { default monospace FOND ID }
  331.         itlbMonoSize:            INTEGER;                                { default monospace font size }
  332.         itlbPrefFond:            INTEGER;                                { preferred FOND ID }
  333.         itlbPrefSize:            INTEGER;                                { preferred font size }
  334.         itlbSmallFond:            INTEGER;                                { default small FOND ID }
  335.         itlbSmallSize:            INTEGER;                                { default small font size }
  336.         itlbSysFond:            INTEGER;                                { default system FOND ID }
  337.         itlbSysSize:            INTEGER;                                { default system font size }
  338.         itlbAppFond:            INTEGER;                                { default application FOND ID }
  339.         itlbAppSize:            INTEGER;                                { default application font size }
  340.         itlbHelpFond:            INTEGER;                                { default Help Mgr FOND ID }
  341.         itlbHelpSize:            INTEGER;                                { default Help Mgr font size }
  342.         itlbValidStyles:        Style;                                    { set of valid styles for script }
  343.         itlbAliasStyle:            Style;                                    { style (set) to mark aliases }
  344.     END;
  345.  
  346. {$ALIGN RESET}
  347. {$POP}
  348.  
  349. {$SETC UsingIncludes := IntlResourcesIncludes}
  350.  
  351. {$ENDC} {__INTLRESOURCES__}
  352.  
  353. {$IFC NOT UsingIncludes}
  354.  END.
  355. {$ENDC}
  356.